﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TXTD.Admin.Data.Migrations
{
    public partial class _202207102 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "USER_ROLE_ID",
                table: "SYS_USER_ROLE",
                type: "nvarchar(32)",
                maxLength: 32,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "ROLE_MENU_ID",
                table: "SYS_ROLE_MENU",
                type: "nvarchar(32)",
                maxLength: 32,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SYS_USER_ROLE",
                table: "SYS_USER_ROLE",
                column: "USER_ROLE_ID");

            migrationBuilder.AddPrimaryKey(
                name: "PK_SYS_ROLE_MENU",
                table: "SYS_ROLE_MENU",
                column: "ROLE_MENU_ID");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_SYS_USER_ROLE",
                table: "SYS_USER_ROLE");

            migrationBuilder.DropPrimaryKey(
                name: "PK_SYS_ROLE_MENU",
                table: "SYS_ROLE_MENU");

            migrationBuilder.DropColumn(
                name: "USER_ROLE_ID",
                table: "SYS_USER_ROLE");

            migrationBuilder.DropColumn(
                name: "ROLE_MENU_ID",
                table: "SYS_ROLE_MENU");
        }
    }
}
